/*
 * @Author: yangni 920556271@qq.com
 * @Date: 2023-12-07 09:26:03
 * @LastEditors: yangni 920556271@qq.com
 * @LastEditTime: 2024-03-11 13:52:04
 * @FilePath: /yt-devops/lib/pages/devices/device_tab/basic_info/base/base_basic_model.dart
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
class DeviceInfoItem {
  String label;
  // 额外需要展示但不需要的信息
  String? extraText;
  String value;
  FieldType type;
  Function? valueOnchange;
  void Function()? onTap;

  DeviceInfoItem(
      {required this.label,
      required this.value,
      this.extraText,
      this.type = FieldType.text,
      this.valueOnchange,
      this.onTap});
}

class SiteListModel {
  int? id;
  String? name;

  SiteListModel({this.id, this.name});

  factory SiteListModel.fromJson(Map<String, dynamic> json) => SiteListModel(
        id: json['id'] as int?,
        name: json['name'] as String?,
      );
}

enum FieldType { text, select, input }
